

package com.company;
import java.util.*;
import java.io.*;
import java.util.Scanner;



public class Main {

    public static void main(String[] args) {

        // write your code here
        Ui ui =new  Ui();


        Sense sense = new Sense();
        sense.initSense();

        Ui.printWelcome(sense.getPerson());

        Scanner in = new Scanner(System.in);
        while (true) {
            String command = in.nextLine();
            String[] words = command.split(" ");
            if (words[0].equals("go")) {
                sense.getPerson().go(words[1]);
                if(words[1].equals("1")){
                    System.out.println("你所在的地方有老虎");
                }else if(words[1].equals("2")){
                    System.out.println("你所在的地方有老虎和狼和生命药水");
                }else if(words[1].equals("3")){
                    System.out.println("你所在的地方有狮子");
                }else if(words[1].equals("4")){
                    System.out.println("你所在的地方有狮子和狼和生命药水");
                }else if(words[1].equals("5")) {
                    System.out.println("你所在的地方有狮子和狼和老虎");
                }
            } else if (words[0].equals("help")) {
                Ui.printHelp();
            } else if (words[0].equals("bye")) {
                ui.displayBye();
            } else if (words[0].equals("打怪")) {
                sense.play();
            } else {
                ui.displayErrorCmdMsg();
            }
        }
    }

}




